home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Devpac 2.12 disk 2.adf / include.cbm / exec / io.i < prev    next >
Text File  |  1987-03-31  |  3KB  |  126 lines

  1.     IFND EXEC_IO_I
  2. EXEC_IO_I SET 1
  3. **********************************************************************
  4. *
  5. *   Commodore Amiga -- ROM Operating System Executive Include File
  6. *
  7. **********************************************************************
  8. *
  9. *   Source Control:
  10. *
  11. *       $Header: io.i,v 33.1 86/03/31 00:55:30 neil Exp $
  12. *
  13. *       $Locker:  $
  14. *
  15. **********************************************************************
  16.  
  17.     IFND EXEC_PORTS_I
  18.     INCLUDE "exec/ports.i"
  19.     ENDC !EXEC_PORTS_I
  20.  
  21.     IFND EXEC_LIBRARIES_I
  22.     INCLUDE "exec/libraries.i"
  23.     ENDC !EXEC_LIBRARIES_I
  24.  
  25.  
  26. *----------------------------------------------------------------
  27. *
  28. *   IO Request Structures
  29. *
  30. *----------------------------------------------------------------
  31.  
  32. *------ Required portion of IO request:
  33.  
  34.  STRUCTURE  IO,MN_SIZE
  35.     APTR    IO_DEVICE                   * device node pointer
  36.     APTR    IO_UNIT                     * unit (driver private)
  37.     UWORD   IO_COMMAND                  * device command
  38.     UBYTE   IO_FLAGS                    * special flags
  39.     BYTE    IO_ERROR                    * error or warning code
  40.     LABEL   IO_SIZE
  41.  
  42.  
  43. *------ Standard IO request extension:
  44.  
  45.     ULONG   IO_ACTUAL                   * actual # of bytes transfered
  46.     ULONG   IO_LENGTH                   * requested # of bytes transfered
  47.     APTR    IO_DATA                     * pointer to data area
  48.     ULONG   IO_OFFSET                   * offset for seeking devices
  49.     LABEL   IOSTD_SIZE
  50.  
  51.  
  52. *------ IO_FLAGS bit definitions:
  53.  
  54.     BITDEF  IO,QUICK,0                  * complete IO quickly
  55.  
  56.  
  57. *----------------------------------------------------------------
  58. *
  59. *   Standard Device Library Functions
  60. *
  61. *----------------------------------------------------------------
  62.  
  63.             LIBINIT
  64.  
  65.             LIBDEF  DEV_BEGINIO         * process IO request
  66.             LIBDEF  DEV_ABORTIO         * abort IO request
  67.  
  68.  
  69. *----------------------------------------------------------------
  70. *
  71. *   IO Function Macros
  72. *
  73. *----------------------------------------------------------------
  74.  
  75. BEGINIO     MACRO
  76.             LINKLIB DEV_BEGINIO,IO_DEVICE(A1)
  77.             ENDM
  78.  
  79. ABORTIO     MACRO
  80.             LINKLIB DEV_ABORTIO,IO_DEVICE(A1)
  81.             ENDM
  82.  
  83.  
  84. *----------------------------------------------------------------
  85. *
  86. *   Standard Device Command Definitions
  87. *
  88. *----------------------------------------------------------------
  89.  
  90. *------ Command definition macro:
  91. DEVINIT     MACRO   * [baseOffset]
  92.             IFC     '\1',''
  93. CMD_COUNT   SET     CMD_NONSTD
  94.             ENDC
  95.             IFNC    '\1',''
  96. CMD_COUNT   SET     \1
  97.             ENDC
  98.             ENDM
  99.  
  100. DEVCMD      MACRO   * cmdname
  101. \1          EQU     CMD_COUNT
  102. CMD_COUNT   SET     CMD_COUNT+1
  103.             ENDM
  104.  
  105.  
  106. *------ Standard device commands:
  107.  
  108.             DEVINIT 0
  109.  
  110.             DEVCMD  CMD_INVALID         * invalid command
  111.             DEVCMD  CMD_RESET           * reset as if just inited
  112.             DEVCMD  CMD_READ            * standard read
  113.             DEVCMD  CMD_WRITE           * standard write
  114.             DEVCMD  CMD_UPDATE          * write out all buffers
  115.             DEVCMD  CMD_CLEAR           * clear all buffers
  116.             DEVCMD  CMD_STOP            * hold current and queued
  117.             DEVCMD  CMD_START           * restart after stop
  118.             DEVCMD  CMD_FLUSH           * abort entire queue
  119.  
  120.  
  121. *------ First non-standard device command value:
  122.  
  123.             DEVCMD  CMD_NONSTD
  124.  
  125.     ENDC !EXEC_IO_I
  126.